﻿using PdfSharp;
using PdfSharp.Pdf;
using PdfSharp.Drawing;

namespace iPdf
{
    class TextWatermarker : Watermarker
    {
        private Text WaterText
        {
            get
            {
                return pageOption.Element as Text;
            }
        }

        protected override XSize ElementSize
        {
            get 
            {
                return this.WaterText.Size;
            }
        }

        protected override void AddWatermark(XGraphics gfx)
        {
            SharpHelper.DrawTextToXGraphics(gfx, this.WaterText);
        } 
    }
}
